<!DOCTYPE html>
<html>
<head>
<base href="${basePath}">
<meta charset="UTF-8">
<title>系统设置</title>
$!{include("import_js_css.html")}
</head>
<body>
	$!{include("header.html")}
	<div class="menu_all">
		<div class="div_search_result clear">
			<div class="panel-heading panel-result-title">
				<h3 class="panel-title">系统设置</h3>
			</div>
			<div class="panel-form-add">
				<!--#var(Site site)-->
				<form class="form-horizontal" role="form" method="post" >
					<input type="hidden" name="id" id="id" value="${site.id}">
					<div class="panel-form-layout">
						<label class="col-sm-1 control-label" style="color: #4da2d4;"><b>积分信息</b></label>
						<br /> <br />
						<label for="inputAssignedTo" class="col-sm-1 control-label" style="width:75px;padding-right:0px;">每消费</label>
						<div class="col-sm-1" style="text-align:left;">
							<input type="text" class="form-control" name="toScore" required id="toScore" value="${site.toScore}">
						</div>
						<label class="col-sm-2" style="text-align:left;padding-left:0px;padding-top: 7px;">元可获得1个积分</label>
						<br /> <br />
						
						<label class="col-sm-1 control-label" style="color: #4da2d4;"><b>开启预定</b></label>
						<br /> <br />
						<label for="inputAssignedTo" class="col-sm-1 control-label" style="width:75px;padding-right:0px;">自动开启</label>
						<div class="col-sm-1" style="text-align:left;">
							<input type="text" class="form-control" name="reserveCount" required id="reserveCount" value="${site.reserveCount}">
						</div>
						<label class="col-sm-2" style="text-align:left;padding-left:0px;padding-top: 7px;">天的预定</label>
						<br /> <br />
						<div class="panel-btn-search">
							<button type="button" onclick="updateSystem()" class="btn btn-default btn-ade-default">保存</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
	function updateSystem(){
		var id=$("#id").val();
		var toScore=$("#toScore").val();
		var toMoney=$("#toMoney").val();
		var recommendScore=$("#recommendScore").val();
		var reserveCount = $("#reserveCount").val();
		var url = "yueyogaAdmin/ajaxeditsystem.jhtml?id="+id+"&toScore="+toScore+"&toMoney="+toMoney+"&recommendScore="+recommendScore + "&reserveCount=" + reserveCount;
		$.post(url,function(response){
			if(response.success){
				var d = alert(response.msg);
				setTimeout(function(){
					d.close().remove();
				},1000);
			}else{
				error(response.msg);
			}
		}, "json");
	}
</script>
</html>